package com.city.domain.party;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 入党申请
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "party_apply", schema = "city", catalog = "")
public class PartyApply {
    private int id;//主键
    private int userId;//基本用户信息表中的id主键
    private String name;//姓名
    private String branch;//入党党支部
    private String tellphone;//手机号
    private String introduce;//特长介绍
    private String icon;//图片
    private String applyBook;//入党申请书
    private String sex;//性别
    private String education;//教育水平
    private String birthPlace;//籍贯
    private String school;//毕业院校
    private String livePlace;//现居地
    private String occupation;//职业
    private String nation;//民族
    private String industry;//所属行业
    private String idCard;//身份证号码
    private String time;//申请时间
    private String updateTime;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "branch")
    public String getBranch() {
        return branch;
    }

    public void setBranch(String branch) {
        this.branch = branch;
    }

    @Basic
    @Column(name = "tellphone")
    public String getTellphone() {
        return tellphone;
    }

    public void setTellphone(String tellphone) {
        this.tellphone = tellphone;
    }

    @Basic
    @Column(name = "introduce")
    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    @Basic
    @Column(name = "icon")
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    @Basic
    @Column(name = "apply_book")
    public String getApplyBook() {
        return applyBook;
    }

    public void setApplyBook(String applyBook) {
        this.applyBook = applyBook;
    }

    @Basic
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "education")
    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    @Basic
    @Column(name = "birth_place")
    public String getBirthPlace() {
        return birthPlace;
    }

    public void setBirthPlace(String birthPlace) {
        this.birthPlace = birthPlace;
    }

    @Basic
    @Column(name = "school")
    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    @Basic
    @Column(name = "live_place")
    public String getLivePlace() {
        return livePlace;
    }

    public void setLivePlace(String livePlace) {
        this.livePlace = livePlace;
    }

    @Basic
    @Column(name = "occupation")
    public String getOccupation() {
        return occupation;
    }

    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }

    @Basic
    @Column(name = "nation")
    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    @Basic
    @Column(name = "industry")
    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    @Basic
    @Column(name = "id_card")
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    @Basic
    @Column(name = "time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PartyApply that = (PartyApply) o;
        return id == that.id &&
                userId == that.userId &&
                Objects.equals(name, that.name) &&
                Objects.equals(branch, that.branch) &&
                Objects.equals(tellphone, that.tellphone) &&
                Objects.equals(introduce, that.introduce) &&
                Objects.equals(icon, that.icon) &&
                Objects.equals(applyBook, that.applyBook) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(education, that.education) &&
                Objects.equals(birthPlace, that.birthPlace) &&
                Objects.equals(school, that.school) &&
                Objects.equals(livePlace, that.livePlace) &&
                Objects.equals(occupation, that.occupation) &&
                Objects.equals(nation, that.nation) &&
                Objects.equals(industry, that.industry) &&
                Objects.equals(idCard, that.idCard) &&
                Objects.equals(time, that.time) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, userId, name, branch, tellphone, introduce, icon, applyBook, sex, education, birthPlace, school, livePlace, occupation, nation, industry, idCard, time, updateTime);
    }
}
